home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2000 February / PCW_2_2000.ISO / software / sw / notfall / xsetup.exe / _SETUP.2 / Group3 / XQ ATI128 2.xpl < prev    next >
Encoding:
XSetup plugin  |  1999-09-10  |  4.1 KB  |  136 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="6"
  3. "COUNT"="4"
  4. "UIPATH"="Hardware\Video Cards\ATI 128"
  5. "NAME"="Mode Settings"
  6. "VERSION"="1.01"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Enable Direct3D support"
  9. "TEXT 2"="Enable OpenGL support"
  10. "TEXT 3"="Enable Gamma Correction support"
  11. "TEXT 4"="Enable 256 gray scale support"
  12. "DESCRIPTION 1"="Some options for your ATI128 card."
  13. "AUTHOR"="Xteq Systems"
  14. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  15. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@xteq.com."
  16. "COMMENT 2"="Thanks to CptSiskoX for the settings and the idea."
  17.  
  18.  
  19. '-- ONLY CHANGE THE LINES WITHOUT ' at the beginning !!
  20. '
  21. '*** Xteq Systems "On/Off" Plug-in Template ***
  22. '*** ID_XQ_PT1 V1.00 
  23.  
  24.  ' how many settings are in this file (change "COUNT=" also!) 
  25.  CountSettings=4
  26.  
  27.  ' does this plug-in requires the user to logoff or to restart his PC?
  28.  bRequireLogoff=0
  29.  bRequireRestart=1
  30.  
  31.  ' if this path exists in the registry, the plug-in will be enabled. if it does
  32.  ' not exist, the plug-in will be disable set to ="" to ignore this check and alway
  33.  ' enable the plug-in, regardless if the path exists or not
  34.  sCheckPath="HKLM\Software\ATI Technologies\Driver\"
  35.  
  36.  
  37.  ' Settings for Value # 1
  38.  sV1_Path="HKEY_LOCAL_MACHINE\Software\ATI Technologies\Desktop\D3D" 
  39.  sV1_OnValue="1"      
  40.  sV1_OffValue="0"      
  41.  sV1_DataType="2"     
  42.  
  43.  ' Settings for Value # 2
  44.  sV2_Path="HKEY_LOCAL_MACHINE\Software\ATI Technologies\Desktop\OpenGL" 
  45.  sV2_OnValue="1"      
  46.  sV2_OffValue="0"      
  47.  sV2_DataType="2"     
  48.  
  49.  ' Settings for Value # 3
  50.  sV3_Path="HKEY_LOCAL_MACHINE\Software\ATI Technologies\CDS\0000\0\DAC\Gamma Correction Support" 
  51.  sV3_OnValue="Yes (0x00000001)"      
  52.  sV3_OffValue="No (0x00000000)"      
  53.  sV3_DataType="1"     
  54.  
  55.  ' Settings for Value # 4
  56.  sV4_Path="HKEY_LOCAL_MACHINE\Software\ATI Technologies\CDS\0000\0\DAC\256 Gray Scale Support" 
  57.  sV4_OnValue="Yes (0x00000001)"      
  58.  sV4_OffValue="No (0x00000000)"      
  59.  sV4_DataType="1"     
  60.  
  61.  
  62.  ' Settings for Value # 5
  63.  sV5_Path="HKCU\Software\Hypernix\Gooey\Network\AllwaysOntop" 
  64.  sV5_OnValue="1"      
  65.  sV5_OffValue="0"      
  66.  sV5_DataType="2"     
  67.  
  68. '*** Xteq Systems "On/Off" Plug-in Template ***
  69. '
  70. '-- STOP CHANGES HERE !!
  71.  
  72.  
  73.  
  74. Sub Plugin_Initialize 
  75.  If Len(sCheckPath)>0 then
  76.     if left(sCheckPath,1)<>"\" then sCheckPath=sCheckPath & "\"
  77.  
  78.     b=RegPathExists(sCheckPath)
  79.     if b=true then
  80.        Call ReadSettings
  81.     else
  82.        Call Disable
  83.     end if  
  84.  else
  85.     Call ReadSettings
  86.  end if
  87. End Sub
  88.  
  89. Sub ReadSettings
  90.                            Call ReadSettingsEx(1,sV1_Path,sV1_OnValue)
  91.   if CountSettings>=2 then Call ReadSettingsEx(2,sV2_Path,sV2_OnValue)
  92.   if CountSettings>=3 then Call ReadSettingsEx(3,sV3_Path,sV3_OnValue)
  93.   if CountSettings>=4 then Call ReadSettingsEx(4,sV4_Path,sV4_OnValue)
  94.   if CountSettings>=5 then Call ReadSettingsEx(5,sV5_Path,sV5_OnValue)
  95. End Sub
  96.  
  97. Sub ReadSettingsEx(ID,REGP,VALON)
  98.  s=RegReadValue(REGP)
  99.  'Call DebugMsg("VAL:" & s & " ID:" & ID & " VAL_ON:" & VALON)
  100.  if CStr(s)=VALON then
  101.     Call SetUIElement(ID,true)
  102.  End if 
  103. End Sub
  104.  
  105.  
  106. Sub Plugin_CheckData(ElementIndex)
  107. End Sub
  108.  
  109.  
  110. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  111.                           Call WriteSettings(GetUIElement(1),sV1_Path,sV1_OnValue,sV1_OffValue,sV1_DataType)
  112.  if CountSettings>=2 then Call WriteSettings(GetUIElement(2),sV2_Path,sV2_OnValue,sV2_OffValue,sV2_DataType)
  113.  if CountSettings>=3 then Call WriteSettings(GetUIElement(3),sV3_Path,sV3_OnValue,sV3_OffValue,sV3_DataType)
  114.  if CountSettings>=4 then Call WriteSettings(GetUIElement(4),sV4_Path,sV4_OnValue,sV4_OffValue,sV4_DataType)
  115.  if CountSettings>=5 then Call WriteSettings(GetUIElement(5),sV5_Path,sV5_OnValue,sV5_OffValue,sV5_DataType)
  116.  
  117.  
  118.  if bRequireLogoff then Logoff()
  119.  if bRequireRestart then Restart()
  120. End Sub
  121.  
  122. Sub WriteSettings(CUR_VAL,REGP,ON_VAL,OFF_VAL,DAT_TYPE)
  123.   if CUR_VAL=true then
  124.      Call RegWriteValue(REGP,ON_VAL,DAT_TYPE)
  125.   else
  126.      Call RegWriteValue(REGP,OFF_VAL,DAT_TYPE)
  127.   end if
  128. End Sub
  129.  
  130.  
  131. Sub Plugin_Terminate 
  132. End Sub
  133.  
  134.  
  135.  
  136.